package com.example.demo.roads.controller;

import com.example.demo.roads.service.RoadsComponent;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 道理数据算法
 *
 * @author yuanzheng
 * @since 2024-09-24
 */
@RestController
@RequestMapping("/roads")
public class RoadsController {

    @Resource
    private RoadsComponent roadsComponent;

    @PostMapping("/queryCrossing")
    @ApiOperation(value = "获取路口数据", tags = {"道理数据算法"})
    public String queryCrossing() {
        return roadsComponent.queryCrossing();
    }

    @PostMapping("/queryRoadSegment")
    @ApiOperation(value = "获取路段数据", tags = {"道理数据算法"})
    public String queryRoadSegment() {
        return roadsComponent.queryRoadSegmentNew();
    }

    @PostMapping("/queryStreetSegment")
    @ApiOperation(value = "获取街段数据", tags = {"道理数据算法"})
    public String queryStreetSegment() {
        return roadsComponent.queryStreetSegmentNew();
    }

}

